<?php
function show_link($class, $test, $link, $title){
    if($class != $test){
        return "<a href='{$link}'>{$title}</a>";
    } else {
        return "<b>{$title}</b>";
    }
}
function get_content_file($config, $class, $method){
    if( $method == 'selector' ){
        return $config['list'];
    } else {
        return $config[$class];
    }
}

header('Content-type:text/html;charset=utf8');
?><html>
    <head>
        <title>.:schedule:.</title>
    </head>
    <body>
        <table>
            <tbody>
                <tr>
                    <td><?php echo show_link($class, 'groups', '/index.php/groups/list', 'Студентов') ?></td>
                    <td><?php echo show_link($class, 'teachers', '/index.php/teachers/list', 'Преподавателей') ?></td>
                </tr>
                <tr>
                    <?php include get_content_file($config, $class, $method); ?>
                </tr>
            </tbody>
        </table>
    </body>
</html>